Auth()
var zxId = globalFun.GetQueryString('zxId');
//资讯详情
$.ajax({
	type: "post",
	url: apicom + "/consultation/consultationInfo",
	data:{id:zxId},
	async: true,
	success: function(res) {
		console.log(res.data)
		var content = res.data;
		$('#msg_title').html(content.title);
		$('.msg_time').html(content.createTime);
		$('.msg_begin').html(content.memberName)
		$('.mian_xq').html(content.content)
	},
	error: function(err) {

	}
});
//热点资讯
$.ajax({
	type: "post",
	url: apicom + "/consultation/welcomeConsultation",
	data:{type:1},
	async: true,
	success: function(res) {
		console.log(res.data)
		var hot = res.data;
		if(hot.length>8){
			hot.length = 8;
		}
		var ss = ''
		for(var i = 0; i < hot.length; i++){
			ss+='<p data-id="'+hot[i].id+'" class="hot_p"><span class="dian">·</span><span class="hot_detail">'+hot[i].title+'</span></p>'
		};
		$('.r_main').html(ss);	
	},
	error: function(err) {

	}
});
//政策文件
$.ajax({
	type: "post",
	url: apicom + "/consultation/welcomeConsultation",
	data:{type:2},
	async: true,
	success: function(res) {
		console.log(res.data)
		var zhengce = res.data;
		var ss = ''
		if(zhengce.length>8){
			zhengce.length = 8;
		}
		for(var i = 0; i < zhengce.length; i++){
			ss+='<p data-id="'+zhengce[i].id+'" class="hot_p"><span class="dian">·</span><span class="hot_detail">'+zhengce[i].title+'</span></p>'
		};
		$('.z_main').html(ss);	
	},
	error: function(err) {

	}
});

$(document).on('click','.hot_p',function(){
	var zxId = $(this).attr('data-id');
	window.location.href = 'msg_detail.html?zxId='+zxId;
})